package com.xinghanlaser.applet.base.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xinghanlaser.applet.base.auth.entity.RoleDO;
import com.xinghanlaser.applet.base.auth.query.RoleQuery;
import com.xinghanlaser.applet.base.auth.vo.RoleDataVO;
import com.xinghanlaser.applet.base.auth.vo.RolePostVO;
import com.xinghanlaser.applet.base.auth.vo.RolePutVO;
import com.xinghanlaser.applet.base.common.entity.ResponseEntity;

import java.util.Collection;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author dym
 * @since 2019-11-19
 */
public interface IRoleService extends IService<RoleDO> {
    /**
     * 根据传入的ids筛选出数据库存在的id列表
     * @param ids
     * @return
     */
    Set<Long> getExistRoleList(Collection<Long> ids);

    ResponseEntity<ResponseEntity.PageResult<RoleDataVO>> pageByCondition(RoleQuery query);

    ResponseEntity<RoleDataVO> getRoleById(Long id);

    ResponseEntity<Set<RoleDataVO>> getRoleListByUserId(Long id);

    ResponseEntity<Void> addRole(RolePostVO postVO);

    ResponseEntity<Void> modRole(RolePutVO putVO);

    ResponseEntity<Void> delRole(Long id);
}
